<template>
  <div id="app">
    <div class="header"></div>
     <div class="view">
       <router-view></router-view> 
     </div>
  </div>
</template>

<script>
  import {loginIn,curOrder,searchNotice,getOpenId} from '@/http'
  import {getCookie} from '@s/utils.js'
  export default {
    name: 'app',
    data(){
      return{
        test:''
      }
    },
    methods:{
    },
    mounted(){
      this.$router.push('login')
      return
      this.$store.dispatch('cookie',getCookie())
      if(!!localStorage.login_info){
        //直接登录
          let login_info = JSON.parse(localStorage.login_info);
           this.$store.dispatch('login_info',login_info);
          loginIn({
              username:login_info.username,
              password:login_info.password
          })
        }else{
          this.$router.push('login')
        }
    }
    
  }
</script>

<style lang="scss">
  @import './style/var.scss';
  @import './style/base.css';
  
  #app {
    position: relative;
    // font-family: "Arial","Microsoft YaHei","黑体","宋体",sans-serif;;
    font-family: STHeitiSC Light,HelveticaNeue Light,Helvetica Light,Helvetica Neue,Helvetica,'Microsoft YaHei',Arial,sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: $font_color_primary;
    width: 100%;
    height: 100%;

    .view{
      position: absolute;
      top:0;
      left:0;
      z-index:222;
      width:100%;
      height:100%;
    }

    .test{
      position: fixed;
      top:0;
      left:0;
      z-index: 10000;
      background:rgba(0,0,0,.5);
    }
  }

</style>
